<extend name="Index/base"/>
<block name="main">
	<section class="section main">
		<div class="clearfix con-main" id="mainContainer">
			<div class="con-left">
				<div class="panel">
					<div class="panel-header">
						<h3 class="panel-title bbs-title">{$user.nick}</h3>
					</div>
					<div class="panel-body">
						<div class="bbs-info">
							<a class="photo bbs-photo" href="//wooo.wang/u/{$user.id}"><img src="{$user.avatar}"></a>
							<p><strong>{$user.gx}</strong> 贡献度</p>
							<p>{$user.desc|default='我什么都没写...'}</p>
							<p class="handle"><a class="handle-donation" href="{:U('/setUser')}">设置</a></p>
						</div>
					</div>
				</div>
				<div class="panel" id="siderBox">
					<ul class="switch-section">
						<li><a href="{:U('/u/'.$user['id'])}"><span class="icon-a"></span> 个人信息</a></li>
						<li><a href="{:U('/collect/'.$user['id'])}"><span class="icon-star"></span> 收藏文档<span class="count green">「{$collets|default=1}」</span></a></li>
						<li><a href="{:U('/review/'.$user['id'])}"><span class="icon-eye"></span> 审阅记录</a></li>
						<li><a href="{:U('/msg')}"><span class="icon-msg"></span> 通知消息<if condition="$mcount gt 0"><span class="count red">「{$mcount}」</span></if></a></li>
						<li><a href="{:U('/log')}"><span class="icon-docu"></span> 贡献日志</a></li>
						<li><a href="{:U('/createBbs')}" class="red"><span class="icon-add"></span> 创建社区</a></li>
						<li><a href="{:U('/createDoc')}"><span class="icon-add"></span> 创建私有文档</a></li>
						<li><a href="{:U('/setUser')}"><span class="icon-setting"></span> 设置账号信息</a></li>
						<li><a href="{:U('/logout@wooo.wang')}"><span class="icon-out"></span> 退 出</a></li>
					</ul>
				</div>
			</div>
			<div class="con-right">
				<div class="panel other">
					<div class="panel-header">
						<h1 class="topic-title">创建社区<span class="icon-sum" id="toggleBtn" onclick="$('#mainContainer').toggleClass('toggle-side-mark');"></span></h1>
						<p class="topic-info">
							<a href="//wooo.wang/u/{$user['id']}">{$user['nick']}</a> • 创建一个新的社区，便于拥有相同兴趣爱好的朋友之间的交流！
						</p>
					</div>
					<div class="panel-body">
						<form action="{:U('/createBbs')}" class="create form" method="post">
							<div class="form-item">
								<input type="text" name="name" id="name" spellcheck="false" minlength="2" maxlength="32" placeholder="社区名">
								<p></p>
							</div>
							<div class="form-item">
								<textarea name="desc" id="desc" spellcheck="false" placeholder="社区简介..."></textarea>
								<p></p>
							</div>
							<div class="form-item">
								<label for="gx">您需要捐献至少1点贡献度作为社区启动资金！</label>
								<input type="number" min="0" id="gx" name="gx" placeholder="贡献度">
								<p></p>
							</div>
							<div class="form-item">
								<input type="hidden" name="cateid" id="cateInput">
								<span>请选择社区所属分类：</span>
								<div class="cate-list" id="cates">
									{$cate}
									<p class="no-cate-msg">注：社区依属于分类而存在，请为您的社区选择一个最合适、最贴切的分类！</p>
								</div>
								<p class="cate-msg"></p>
							</div>
							<div class="form-item">
								<button class="create-btn" id="createOrgBtn">创建社区</button>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</section>
</block>
<block name="js">
	<script>
		var gx = {$user.gx};
	</script>
	<script src="__STATIC__/doc/js/createOrg.js?v=__VERSION__"></script>
</block>